package com.ophiux.system.api.feign;

import com.ophiux.common.core.base.Result;
import com.ophiux.common.core.constant.SecurityConstants;
import com.ophiux.common.core.constant.ServiceNameConstants;
import com.ophiux.system.model.dto.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @desc: 社交登录账号
 * @author: hhl
 * @date：2023/12/9 21:04
 */
@FeignClient(contextId = "remoteSocialDetailsService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteSocialDetailsService {

    /**
     * 通过社交账号或手机号查询用户、角色信息
     * @param inStr appid@code  sms@138967...
     * @param from 调用标志
     * @return
     */
    @GetMapping("/social/info/{inStr}")
    Result<UserInfo> social(@PathVariable("inStr") String inStr, @RequestHeader(SecurityConstants.FROM) String from);

}
